//
//  BigNumber2Cell.m
//  7.13苏宁框架
//
//  Created by mini on 15/7/19.
//  Copyright (c) 2015年 lovena. All rights reserved.
//

#import "BigNumber2Cell.h"
#import "Common.h"
@implementation BigNumber2Cell

-(instancetype)init
{
    self = [super init];
    if (self) {
        self = [[[NSBundle mainBundle]loadNibNamed:@"BigNumber2Cell" owner:nil options:nil]lastObject];
    }
    return self;
}
- (void)awakeFromNib {
    //给更多和收起添加手势识别器
    UITapGestureRecognizer *tap1 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(moreGoods)];
    [self.moreView addGestureRecognizer:tap1];
    UITapGestureRecognizer *tap2 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(lessGoods)];
    [self.lessView addGestureRecognizer:tap2];
    self.cellView.height = 170;
   
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
//加载更多
-(void)moreGoods
{
    self.cellView.height = 288;
    if ([self.delegate respondsToSelector:@selector(setHeight:)]) {
        [self.delegate setHeight:self.cellView.height];
    }
}

-(void)lessGoods
{
    self.cellView.height = 170;
    if ([self.delegate respondsToSelector:@selector(setHeight:)]) {
        [self.delegate setHeight:self.cellView.height];
    }
}
@end
